--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit ff58028ca7baa72ab43200a80b01a0558e058cfd
Parents : bdf9680
Author : Mark Qvist <mark@unsigned.io>
Date : 2024-09-07T09:44:07+02:00
Fix PTT button hiding
Changes
3 files changed, 7 insertions(+), 8 deletions(-)
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index 3613c4be..b85232c5 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -2138,6 +2138,7 @@ class SidebandApp(MDApp):
keys_str = "The crytographic keys for the destination address are unknown at this time. You can wait for an announce to arrive, or query the network for the necessary keys."
self.messages_view.ids.nokeys_text.text = keys_str
self.widget_hide(self.messages_view.ids.message_input_part, True)
+ self.widget_hide(self.messages_view.ids.message_ptt, True)
self.widget_hide(self.messages_view.ids.no_keys_part, False)
diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index 3409afbc..e0026f90 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -35,7 +35,7 @@ if RNS.vendor.platformutils.get_platform() == "android":
jnius.reflect.log = redirect_log()
############################################
else:
- import sbapp.plyer as plyer
+ import sbapp.plyer as plyer
class PropagationNodeDetector():
EMITTED_DELTA_GRACE = 300
diff --git a/sbapp/ui/messages.py b/sbapp/ui/messages.py
index 55fed699..ef8f1b71 100644
--- a/sbapp/ui/messages.py
+++ b/sbapp/ui/messages.py
@@ -119,6 +119,11 @@ class Messages():
layout.bind(minimum_height=layout.setter('height'))
self.list = layout
+ if self.ptt_enabled:
+ self.hide_widget(self.ids.message_ptt, False)
+ else:
+ self.hide_widget(self.ids.message_ptt, True)
+
c_ts = time.time()
if len(self.new_messages) > 0:
self.update_widget()
@@ -238,13 +243,6 @@ class Messages():
self.ids.message_text.font_name = self.app.input_font
- if self.ptt_enabled:
- RNS.log("PTT display") # TODO: Remove and fix this
- self.hide_widget(self.ids.message_ptt, False)
- else:
- RNS.log("PTT hide") # TODO: Remove and fix this
- self.hide_widget(self.ids.message_ptt, True)
-
if self.loading_earlier_messages:
self.new_messages.reverse()
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────